<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>商品列表</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="assets/mui/css/mui.min.css">
    <link rel="stylesheet" type="text/css" href="css/base.css">
    <link rel="stylesheet" type="text/css" href="assets/fontAwesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="css/category.css">
    <script src="assets/mui/js/mui.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="assets/zepto/zepto.min.js"></script>
    <script src="assets/artTemplate/template-native.js"></script>
    <script type="text/javascript" src="js/category.js"></script>
    <script src="./js/public.js"></script>
</head>

<body>
    <header class="mui-bar mui-bar-nav my-header">
        <a class="mui-icon mui-icon-search mui-pull-right" href="search.html"></a>
        <h1 class="mui-title">YD购</h1>
    </header>
    <nav class="mui-bar mui-bar-tab footer my-footer">
        <a class="mui-tab-item" href="index.html">
            <span class="mui-icon mui-icon-home"></span>
            <span class="mui-tab-label">首页</span>
        </a>
        <a class="mui-tab-item mui-active" href="category.html">
            <span class="mui-icon mui-icon-bars"></span>
            <span class="mui-tab-label">分类</span>
        </a>
        <a class="mui-tab-item" href="cart.html">
            <span class="mui-icon fa fa-shopping-cart"></span>
            <span class="mui-tab-label">购物车</span>
        </a>
        <a class="mui-tab-item" href="user.html">
            <span class="mui-icon mui-icon-person"></span>
            <span class="mui-tab-label">会员中心</span>
        </a>
    </nav>
    <div class="my-content">
        <!-- 左边盒子 -->
        <div class="category-left">
            <div class="mui-scroll-wrapper">
                <div class="mui-scroll">
                    <!--这里放置真实显示的DOM内容-->
                    <div class="links" id="links">
                    </div>
                </div>
            </div>
        </div>
        <!-- /左边盒子 -->
        <!-- 右边盒子 -->
        <div class="category-right">
            <div class="mui-scroll-wrapper">
                <div class="mui-scroll">
                    <!--这里放置真实显示的DOM内容-->
                    <ul class="brand-list mui-clearfix">
                    </ul>
                </div>
            </div>
        </div>
        <!-- /右边盒子 -->
    </div>
    <!-- 这是就是一级分类数据拼接模板 -->
    <script id="category-first" type="text/template">
        <% for(var i=0;i<result.length;i++){ %>
    		<a
    			href="#"
    			data-id="<%=result[i].id%>">
    			<%=result[i].categoryName%>
    		</a>
		<% } %>
    </script>
    <!-- / 这是就是一级分类数据拼接模板 -->
    <!-- 二级分类数据拼接模板 
    	夭寿啊！！！，千万不要在<%%>里面加空格啊！！！-->
    <script id="category-second" type="text/template">
        <% for(var i=0;i<rows.length;i++){ %>
	        <li>
	            <a href="#">
	            	<img src="<%=rows[i].brandLogo%>"/>
	            	<p><%=rows[i].brandName%></p>
	            </a>
	        </li>
	    <% } %>

	    <% if(!rows.length){%>
	    	<div>暂无数据</div>
	    <% } %>
    </script>
    <!-- /二级分类数据拼接模板 -->
</body>

</html>